<template>
  <div>
    <el-card>
      <el-table
        :data="tableData"
        style="width: 100%; margin-bottom: 20px"
        row-key="id"
        border
        default-expand-all
        :tree-props="{
          children: 'children',
          id: 'id',
          label: 'permissionName',
        }"
      >
        <el-table-column prop="permissionName" label="权限名称" width="300px">
        </el-table-column>
        <el-table-column prop="permissionMark" label="权限标识" width="300px">
        </el-table-column>
        <el-table-column prop="permissionDesc" label="权限描述">
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import { getPermissionList } from "../../api/permission";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
    this.getPermissionList();
  },
  methods: {
    async getPermissionList() {
      let res = await getPermissionList();
      console.log(res);
      this.tableData = res;
    },
  },
};
</script>

<style scoped >
</style>
